package cn.huiyunche.base.service.enums;

/**
 * 公司类型枚举
 *
 * @author houjianhui
 */
public enum CompanyTypeEnum {
    CCOMPANY(30, "运输公司"),
    SCOMPANY(40, "托运公司"),
    SUPPLIER(50, "分供方");

    private final int value;
    private final String text;

    CompanyTypeEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static CompanyTypeEnum getByValue(int value) {
        for (CompanyTypeEnum temp : CompanyTypeEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
